class User < ActiveRecord::Base
    self.table_name  = "userdb"
    self.primary_key = "keysearch"
    
    has_many :opencalls_reported, :class_name => "Opencall", :foreign_key => "cust_id"
    has_many :opencalls_owned, :class_name => "Opencall", :foreign_key => "owner"
    
    belongs_to :customer, :class_name => "User", :foreign_key => "cust_id"
    belongs_to :owner, :class_name => "User", :foreign_key => "owner"
    
end
